package cn.anecansaitin.industrialization_expansion;

import cn.anecansaitin.industrialization_expansion.common.cap.CapabilityModifiedAttribute;
import cn.anecansaitin.industrialization_expansion.common.cap.CapabilityModuleStorage;
import cn.anecansaitin.industrialization_expansion.common.entity.EntityRegister;
import cn.anecansaitin.industrialization_expansion.common.item.ItemRegister;
import cn.anecansaitin.industrialization_expansion.common.item.crafting.ModRecipeTypes;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod(ModConstant.MOD_ID)
public class IndustrializationExpansion {
    public IndustrializationExpansion() {
        ExtensionLoader.load();
        IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus();
        bus.addListener(this::preInit);
        ModRecipeTypes.registry(bus);
        ItemRegister.registry(bus);
        EntityRegister.registry(bus);
    }

    public void preInit(FMLCommonSetupEvent evt) {
        CapabilityModifiedAttribute.register();
        CapabilityModuleStorage.register();
    }
}
